<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrdersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('orders',function (Blueprint $table){
            $table->increments('id');
            $table->integer('uid');
            $table->integer('address_id');
            $table->string('order_sn');
            $table->decimal('order_money');
            $table->decimal('pay_money');
            $table->string('order_status');
            $table->string('address_info',1000);
            $table->string('delivery_user',30)->comment('收货人');
            $table->string('phone',15)->comment('收货人电话');
            $table->string('deliver_company')->nullable() ->comment('快递公司');
            $table->string('deliver_sn')->nullable() ->comment('运单号');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
